import React, {useState} from 'react';
import {View, Text, Button as Button2,  TextInput, TouchableOpacity, StyleSheet,PixelRatio,Alert } from 'react-native';
import axios from 'axios';
import { styles} from './MyStyle';
import {MyButton01} from './UiComponents';

export const Ant03 =()=> {
  const [text, setText] = useState('');
  const handlePress = () => {
    setText('');
    // 点击按钮后，5秒后更新文本
    setTimeout(() => {
      setText('文字已显示3');
    }, 1000); // 5000毫秒 = 5秒
  };
  return <View  style={ 
    { 
      alignItems:'center',
      flexDirection: 'row', gap :16,padding: 0,marginBottom :16 }
    }>
<MyButton01 text="Timer" onPress={handlePress}></MyButton01>
<Text>Text: {text}</Text>
  </View>;
}





